home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8463 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.4 KB  |  65 lines

  1. Path: valhalla.cs.wright.edu!not-for-mail
  2. From: pedwards@valhalla.cs.wright.edu (Phil Edwards)
  3. Newsgroups: gnu.g++.help,comp.lang.c++
  4. Subject: clog??  What the $!#@*^ is "clog" ?!!?
  5. Followup-To: gnu.g++.help
  6. Date: 18 Feb 1996 23:29:37 GMT
  7. Organization: the top of Solsbury Hill.
  8. Approved: I couldn't find five dentists to ask.  Sorry.
  9. Distribution: world
  10. Message-ID: <4g8cp1$v8k@valhalla.cs.wright.edu>
  11. NNTP-Posting-Host: gamma.cs.wright.edu
  12. X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
  13.  
  14. [crossposted to gnu.g++.help and comp.lang.c++ -- followups to gnu.g++.help]
  15.  
  16.  
  17.  
  18. The compiler is gcc 2.7.2, the system is a DEC Alpha running OSF/1
  19. 3.0, lately upgraded to dUnix 3.2.  It is 37 degrees F outside, and the
  20. wind is from the west.  My sign is Leo.  I think that covers most of
  21. the things that tend to affect computers...
  22.  
  23.  
  24. Now.  For years I have been getting this and similar warnings, usually
  25. whenever I try to use any of the cout/cerr streams.  The programs run
  26. jus' fine, but the warnings are extremely annoying, especially when you
  27. know the code is clean.  Can anyone give me some tips to clear this
  28. up?  Are there certain libraries I am not including?
  29.  
  30. Here is an example of a compilation and link which produced the error.
  31. ***This server is not even using cout/cerr, either:***
  32.  
  33. ================================================================
  34. g++ -g -I. -I$HOME/include -Wall -c common.C
  35. g++ -g -I. -I$HOME/include -Wall -c server.C
  36. g++ -g -I. -I$HOME/include -Wall -o server.`hostname|sed 's/\..*//'`
  37.    common.o server.o
  38.  
  39. /usr/ucb/ld:
  40. Warning: clog defined as GLOBAL DATA but is defined in a shared lib as
  41. a GLOBAL FUNC
  42. /usr/ucb/ld:
  43. Warning: clog defined as GLOBAL DATA but is defined in a shared lib as
  44. a GLOBAL FUNC
  45. ================================================================
  46.  
  47. Since it's the linker producing the warning and not the compiler, I
  48. don't know which of the *many* lines of code is responsible, if any.
  49. (So I didn't post any of the code.)  The only mention of "clog" in 
  50. any files anywhere is in iostream.h:
  51.  
  52.     // clog->rdbuf() == cerr->rdbuf()
  53.     extern _IO_ostream_withassign cout, cerr, clog;
  54.  
  55. Any tips would be gratefully accepted.  Thanks for your time!
  56.  
  57.  
  58. Luck++;
  59. Phil
  60.  
  61. -- 
  62. #include<std/disclaimer.h>               The gods do not protect fools. Fools
  63. finger pedwards@gamma.cs.wright.edu      are protected by more capable fools.
  64. email pedwards@valhalla.cs.wright.edu                            -Larry Niven
  65.